package com.wxq.shape;

import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;

public class MapString extends MapCircle {

	protected float xDrawCord;
	protected float yDrawCord;
	
	protected String text;
	
	public MapString(float xCoord, float yCoord, String text) {
		super(xCoord, yCoord, 1);
		this.text = text;
		xDrawCord = xCoord;
		yDrawCord = yCoord;
	}
	
	@Override
	public void zoom(Matrix scale) {
		float [] point = new float []{xCoord,yCoord};
		scale.mapPoints(point);
		xDrawCord = point[0];
		yDrawCord = point[1];
	}
	
	@Override
	public void draw(Canvas canvas, Paint paint) {		
		canvas.drawText(text, xDrawCord + xOffset, yDrawCord + yOffset, paint);	
	}
}
